Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Windows.Forms

Public Class FrmCrTheoDoi_ChiTiet_CongNo_KhachHang_DakNong
    Private thangnam As Date
    Private tenkh As String
    Private tongsotienno As Double
    Private customerReport As ReportDocument

    Private Sub FrmCrTheoDoi_ChiTiet_CongNo_KhachHang_DakNong_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Dim sqlQuery As String = "SELECT * FROM tbl_temp_theodoi_congno_khachhang_chitiet"
        Dim reportPath = Application.StartupPath & "\" & "CrTheoDoi_Chitiet_CongNoKhachHang_Daknong.rpt"
        customerReport = New ReportDocument()
        customerReport.Load(reportPath)
        customerReport.SetDataSource(moduleReportConfig.GetDataTable(sqlQuery))
        customerReport.SetParameterValue("ngayThangNam", thangnam)
        customerReport.SetParameterValue("ten_khachhang", tenkh)
        customerReport.SetParameterValue("tongsotienno", tongsotienno)
        customerReport.SetParameterValue("ketoantruong", globalVariale.KETOANTRUONG)
        customerReport.SetParameterValue("company", globalVariale.COMPANY)
        customerReport.SetParameterValue("address", globalVariale.ADDRESS)
        'customerReport.SetParameterValue("giamdoc", globalVariale.TONGGIAMDOC)
        Me.CrNXTTongHopview.ReportSource = customerReport

    End Sub

    Public Sub setThangnam(ByVal s As Date)
        thangnam = s
    End Sub

    Public Sub setTenkh(ByVal s As String)
        tenkh = s
    End Sub

    Public Sub setTongsotienno(ByVal d As Double)
        tongsotienno = d
    End Sub

End Class
